package com.chuangke.admin.service;

import com.chuangke.admin.dto.RegisterBean;
import com.chuangke.admin.entity.SimpleSysUser;
import com.chuangke.admin.entity.SysUser;
import com.chuangke.framework.service.GridDictModelService;

import java.util.List;
import java.util.Set;

/**
 * 用户管理
 *
 * @author chuangke
 * @date Oct 29, 2018
 */
public interface SysUserService extends GridDictModelService<SysUser> {

	/**
	 * 获取简单用户信息
	 *
	 * @param id
	 * @return
	 */
	SimpleSysUser findSimpleById(String id);

	/**
	 * 获取简单用户信息
	 *
	 * @param username
	 * @return
	 */
	SimpleSysUser findSimpleByName(String username);

	SysUser findByName(String username);
	
	SysUser findByNickName(String nickName);
	
	/**
	 * 根据账号模糊搜索用户
	 * @param name
	 * @return
	 */
	SysUser findByName(String adName,String uidName);
	
	SysUser findByPhone(String phoneNumber);

	/**
	 * 查找用户的菜单权限标识集合
	 *
	 * @param userName
	 * @return
	 */
	Set<String> findPermissions(String userName);

	/**
	 * 修改密码
	 *
	 * @param sysUser
	 */
	void passwd(SysUser sysUser);

	/**
	 * 修改头像
	 */
//	FileInfo avatar(MultipartFile file) ;

	void avatar(String base64) ;

	void updateBaseInfo(SysUser sysUser);
	
	void updateUserOtherName(SysUser sysUser);

	int changeStatus(List<String> ids, String status);

	List<SysUser> findUsersByRoleId(String roleId);

	List<SysUser> findUsersInheritRole(String roleId);

	List<SysUser> findUsersByDeptId(List<String> deptIdList);

	void changeInheritRole(String userId, String isInheritRole);

	//批量重置密码
	void resetPassword(String password, List<String> userIdList);

	void register(RegisterBean registerBean);

//	List<SysUser> findUserByRoleName(String role);

//	Map<String, Record> getStandardData();
}
